[TGrid] Alerts status update use RBAC api#108092
[TGrid] Alerts status update use RBAC api#108092michaelolo24 merged 25 commits intoelastic:masterfrom
Conversation
…s and adds logic for switching between signal.status and workflow status when updating alerts in .siem-signals
… to use WORKFLOW_STATUS instead of ALERT_STATUS
…dtion to KQL string
adds replace ALERT_STATUS with ALERT_WORKFLOW_STATUS and updates tests and adds logic for switching between signal.status and workflow status when updating alerts in .siem-signals
…us' and not { signals: {status }} in alerts client
optionally use fields api in requests if _source does not contain authz properties
…emd/kibana into tgrid-bulk-actions-rbac-update
| } as const; | ||
| export type AlertConsumers = typeof AlertConsumers[keyof typeof AlertConsumers]; | ||
| export type STATUS_VALUES = 'open' | 'acknowledged' | 'closed'; | ||
| export type STATUS_VALUES = 'open' | 'acknowledged' | 'closed' | 'in-progress'; // TODO: remove 'in-progress' after migration to 'acknowledged' |
There was a problem hiding this comment.
@dplumlee - just pinging you here since you're working on these changes
| return buildEsQuery( | ||
| let esQuery; | ||
| if (id != null) { | ||
| esQuery = { query: `_id:${id}`, language: 'kuery' }; |
There was a problem hiding this comment.
It could be helpful to have a comment here describing how these different scenarios happen
| status: t.union([ | ||
| t.literal('open'), | ||
| t.literal('closed'), | ||
| t.literal('in-progress'), // TODO: remove after migration to acknowledged |
| status: t.union([ | ||
| t.literal('open'), | ||
| t.literal('closed'), | ||
| t.literal('in-progress'), // TODO: remove after migration to acknowledged |
|
FWIW I've been attempting to do some type safe "workflow_status" migration updates in an existing PR that I'm hoping to get in today before I leave. |
…test fix a bug where we were not waiting for updates to complete when usin…
michaelolo24
left a comment
There was a problem hiding this comment.
Tested again, works great and thanks for taking care of all of those changes! 💪🏾
Co-authored-by: Devin Hurley <devin.hurley@elastic.co>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @dhurley14 @semd |
Summary
Call RBAC alerts bulk update endpoint from the tGrid status bulk update. It is used in 3 different places:
Bulk status update

Single status update from table row

SIngle status update from flyout

ℹ️- Currently allowing both
in-progressandacknowledgedstatus. Thein-progressstatus will need to be cleaned in the status field migration.Checklist
Delete any items that are not applicable to this PR.